﻿@model S4Store.Models.Report.SaleHistroyModel
@{
    Layout = null;
    ViewBag.Title = "SaleHistroy";


    S4Store.Models.Chart.Line ChartModel = new S4Store.Models.Chart.Line();
    //ChartModel.Name = "登记客户";
    ChartModel.YAxis = "销售台次历史记录(辆)";
    //ChartModel.Width = 500;
    //ChartModel.Height = 300;
    Model.Reports.ForEach(t => ChartModel.XAxis.Add(t.Year + "-" + t.Month));
   
    S4Store.Models.Chart.ChartSeries series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "订单数量";
    Model.Reports.ForEach(t => series1.Data.Add(t.OrderCount));
    ChartModel.Serieses.Add(series1);


    S4Store.Models.Chart.ChartSeries series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "销售台次";
    Model.Reports.ForEach(t => series2.Data.Add(t.GiveCarCount));
    ChartModel.Serieses.Add(series2);

    S4Store.Models.Chart.ChartSeries series3 = new S4Store.Models.Chart.ChartSeries();
    series3.Name = "销售目标";
    Model.Reports.ForEach(t => series3.Data.Add(t.SaleTarget));
    ChartModel.Serieses.Add(series3);
    ChartModel.Colors = new List<string> { S4Store.Models.Chart.Color.Blue, S4Store.Models.Chart.Color.Red, S4Store.Models.Chart.Color.Green};
    ChartModel.IsRate = false;
    
    
}
<div style="height:100%; overflow:auto">

@Html.Action("ReportBar", "Common", Model.BarModel)
@Html.Partial("../Chart/Line", ChartModel)
</div>